package com.ruoyi.web.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
import org.springframework.web.util.DefaultUriBuilderFactory;
import org.springframework.web.util.UriTemplateHandler;

/**
 * TODO
 *
 * @author chenchuan2
 * @date 2023-05-03 11:05:08
 */
@Configuration
public class OpenAiConfig {

    /**
     * 开启WebSocket端点
     *
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

    @Bean
    public UriTemplateHandler uriTemplateHandler() {
        return new DefaultUriBuilderFactory();
    }
}
